import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
// 导入ant design 组件库
import { NgZorroAntdModule, NZ_I18N, zh_CN } from 'ng-zorro-antd';
// 配置 angular i18n
import { registerLocaleData } from '@angular/common';
import zh from '@angular/common/locales/zh';

import { CoreModule } from './core/core.module';
import { SharedModule } from './shared/shared.module';
import { LayoutModule } from './layouts/layout.module';
import { LoginModule } from './routes/login/login.module';

// 加载路由模块
import { RoutesModule } from './routes/routes.module';
import { AppComponent } from './app.component';

registerLocaleData(zh);

@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [
    BrowserModule,
    CoreModule,
    LayoutModule,
    LoginModule,
    SharedModule,
    FormsModule,
    RoutesModule,
    BrowserAnimationsModule,
    NgZorroAntdModule,
  ],
  // 配置 ng-zorro-antd 国际化
  providers: [
    { provide: NZ_I18N, useValue: zh_CN }
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
